package java_learn.java_jinjie.GenericClass;

/**
 * 创建对象的时候确定泛型数据类型
 */
public class GenericClass<E> {
    private E name;

    public E getName() {
        return name;
    }

    public void setName(E name) {
        this.name = name;
    }

    public static void main(String[] args) {
        GenericClass gc = new GenericClass();
        GenericClass<String> gc2 = new GenericClass<>();
        gc2.setName("name");
        System.out.println(gc2.getName());
        gc.setName(435.444);
        System.out.println(gc.getName());
    }
}
